package com.tengju.bff.interfaces.covercharge.constant;

/**
 * 个人发放渠道
 *
 * @author zhaoyi
 */
public enum PersonalGiveChannelEnum {

    EBANK("ebank", "企业网银"),
    CLOUD("cloud", "云账户");

    private String code;
    private String desc;

    PersonalGiveChannelEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return this.code;
    }

    public String getDesc() {
        return this.desc;
    }

    public static String getDesc (String code){
        for(PersonalGiveChannelEnum orderStatusEnum : (PersonalGiveChannelEnum.values())){
            if(orderStatusEnum.getCode().equals(code)){//如果传入的code与此枚举code相同，则返回此枚举
                return orderStatusEnum.getDesc();
            }
        }
        return null;
    }

}
